package com.scenic.rd_android.memory.staticLack;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;

import com.nova.scenic.projectlibs.util.debug.ToastAlertUtil;
import com.scenic.rd_android.R;

public class AppManager {
        private static AppManager instance;
        private Context context;

        private AppManager(Context context) {
            this.context = context;
        }

        public static AppManager getInstance(Context context) {
            if (instance == null) {
                instance = new AppManager(context);
            }
            return instance;
        }

    public void loadImage() {
        Drawable drawable;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            drawable =   context.getResources().getDrawable(R.mipmap.jpg_test,null);
        }else {
            drawable =  context.getResources().getDrawable(R.mipmap.jpg_test);
        }
        ToastAlertUtil.showImageInfo(context,drawable);
    }
}